{template 'admin', 'header'}
    <table cellspacing="1"  cellpadding="0" class="table_form">
        <caption>分类管理</caption>
        <tbody>
            <tr>
                <td>{if check_perms('TYPE002') === true}<a href="admin/type.php?action=add&parentcode={$parentcode}&topcode={$tcode}&forward={$back_url}">添加分类</a>{/if}
                </td>
            </tr>
        </tbody>
    </table>
<form action="admin/type.php?action=listorder" id="form" method="post" onsubmit="return r_submit(this);" >
        <table cellspacing="1" cellpadding="0" class="table_list" >
            <tr>
                <th align="center">
                    排序
                </th>
                <th align="center">
                    分类code
                </th>
                <th align="center">
                    分类名称
                </th>
                <th align="center">
                    操作管理
                </th>
            </tr>
            {loop $type_res $info}
            {php $code=$info['tcode'];$tid=$info['tid'];$topcode=$info['topcode']}
            <tr>
                <td class="align_c"><input type="text" size="4" maxlength="11" name="listorder[{$info['tid']}]" value="{$info['listorder']}" {if check_perms('TYPE005') === false} disabled='true' {/if} /></td>
                <td class="align_c">{$info['tcode']}</td>
                <td class="align_c" width="40%">{$info['tname']}</td>
                <td class="align_c">{if check_perms('TYPE002') === true}  <a href="admin/type.php?action=add&parentcode={$code}&topcode={$topcode}&forward={$back_url}">添加子分类</a> | {/if}
                                                                          <a href="admin/type.php?action=manage&parentcode={$code}&topcode={$topcode}&forward={$back_url}">子分类</a>
                                    {if check_perms('TYPE003') === true} |<a href="admin/type.php?action=edit&tcode={$info['tcode']}&forward={$back_url}">修改</a>  {/if}
                                    {if check_perms('TYPE004') === true} |<a href="javascript:void(0)" onclick="my_request('{format_url("admin/type.php?action=delete&tid=$tid&tcode=$code")}','是否删除？')">删除</a>{/if}</td>
            </tr>
            {/loop}
        </table>
        <table cellspacing="0"  cellpadding="0">
            <tr>{if check_perms('TYPE005') === true}<td class="align_l" width="4%"><input type="submit" class="button_style" value="排序" /></td>{/if}&nbsp;&nbsp;<td class="align_l" width="5%"><input type="button" value="返回" onclick="self.location = '{urldecode($forward)}'" /></td><td></td></tr>
        </table>
            <div id="pages">{$pages}</div>
    </form>
{template 'admin', 'footer'}

